﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace XiAnAirport.Models
{
    public class DeviceStateInfo
    {
    }

    public class LiftStateALL
    {
        public string opcNO { get; set; }//OPC编码 
        public string Car_position { get; set; }//物理楼层
        public int Car_position_index { get; set; }
        public string Car_door { get; set; }//门状态：门状态:0=open;1=opening;2=close;3=closing 
        public int Moving_direction { get; set; }//方向:0=down;1=up;2=none 
        public int Elevator_control_status { get; set; }//电梯模式：0=正常,2=消防员运行，4=司机,7=退出服务 
        public int Elevator_moving_status { get; set; }  //1=离线，2=正常，3=故障 4=停用
        public int Full_load_alarm { get; set; }//0=正常/1=满载/2=超载/ 
        public int Car_load { get; set; }//负载0-150，% of Nominal Load   
        public string CarCall { get; set; }//轿内呼叫 
        public string Landing_call_respond_up { get; set; }//外呼-上召 
        public string Landing_call_respond_down { get; set; }//外呼-下召 
        public int Faults { get; set; }//故障 
        public int Alarm_bell { get; set; }//是否困人，0=无，1=困人
        public int Elevator_running_state { get; set; }//运行状态:1=正常速度;2=减速;5=重新调平;6=站立
        public string Areaname { get; set; }//区域名称
        public int GroupID { get; set; }//维保组id
        public int ElevatorID { get; set; }//电梯id
        public string ElevatorNO { get; set; }//电梯编号
        public string ElevatorName { get; set; }//电梯名称
        public int AreaID { get; set; }//区域id
        public string FloorInf { get; set; }//楼层信息
        public int StatusChange { get; set; }//状态改变
        public int Outofservice { get; set; }//停用
        public string SaleNo { get; set; }//销售编号
        public double Speed { get; set; }//速度
        public string ContractNo { get; set; }//合同编号
        public string Elevator_control_statusName { get; set; }//电梯状态名称
        public string Elevator_control_statusNameEn { get; set; }//电梯状态英文名称
        public DateTime UpdateTime { get; set; }//更新时间
        public string IPAddress { get; set; }//IP地址
        public int ThroughDoor { get; set; }//贯通门
        public string Manufacturer { get; set; }//厂商
        public string Model { get; set; }//型号
        public string physicalNumber { get; set; }//物理编号
        public string certificateNumber { get; set; }//合格证编号
        public string regNumber { get; set; }//注册编号
        public int Startfloor { get; set; }//初始楼层
        public DateTime StartTime { get; set; }//运行开始时间 
        public int run_flag { get; set; }//运行标记
        public string elevatorType { get; set; }//电梯类型
        public int bend { get; set; }//折弯次数
        public int faultnum { get; set; }//故障次数
        public double RunTime { get; set; }//运行时间(单位：小时)
        public int RunTimeSecond { get; set; }//运行时间(单位：秒)
        public double RunTimeSum { get; set; }//运行总时间(单位：小时)
        public int RunTimeSecondSum { get; set; }//运行总时间(单位：秒)
        public int Runs { get; set; }//运行次数
        public int OpenTime { get; set; }//开关门次数
        public string maintenanceTime { get; set; }//上次维修时间
        public string nextmaintenanceTime { get; set; }//下次年检天数
        public string lastmaintenanceTime { get; set; }//上次年检时间
        public int mainAreaId { get; set; }//父区域id
        public string mainAreaName { get; set; }//父区域名称
        public string Temperature { get; set; }//温度
        public string cameraNo { get; set; }
        public double runssum { get; set; }//累计运行时间
        public double ZLX { get; set; }//x坐标
        public double ZLY { get; set; }//y坐标
        public int EmergencyStop { get; set; }//急停
        public int CoverPlate { get; set; }//防盗盖板故障

    }

    public class ElevatorState
    {
        public int ID { get; set; }
        public int ElevatorID { get; set; }
        public string Elevator_control_statusName { get; set; }
        public string Elevator_control_statusNameEn { get; set; }//电梯状态英文名称
        public int Elevator_control_status { get; set; }
        private int elevator_moving_status = -1;
        public int Elevator_moving_status//1=离线，2=正常，3=故障 4=停用
        {
            get { return elevator_moving_status; } //1=离线，2=正常，3=故障 4=停用
            set { elevator_moving_status = value; }
        }
        public int Fault_alarm_ID { get; set; }
        public string Landing_call_respond_up { get; set; }
        public string Landing_call_respond_down { get; set; }
        public string Car_position { get; set; }
        public int Car_position_index { get; set; }
        public int Car_load { get; set; }
        public string Car_door { get; set; }
        public int Moving_direction { get; set; }
        public int Full_load_alarm { get; set; }
        public int Fire { get; set; }
        public int Alarm_bell { get; set; }
        public int Safety_device_status { get; set; }
        public int IsDelete { get; set; }
        public int Recordhead { get; set; }//记录头
        public int Recordtail { get; set; }//记录尾
        public DateTime UpdateTime { get; set; }
        public string ElevatorNO { get; set; }
        public string ElevatorName { get; set; }
        public string Areaname { get; set; }
        public int pageStartIndex { get; set; }
        public int pageSize { get; set; }
        public string ElevatorStateName { get; set; }
        public string CarCall { get; set; }
        public int Faults { get; set; }
        public int GroupID { get; set; }
        public string FloorInf { get; set; }
        public int AreaID { get; set; }
        public int Elevator_running_state { get; set; }
        public int IsAll { get; set; }
        public int Outofservice { get; set; }
        public string opcNO { get; set; }
        public string SaleNo { get; set; }
        public double Speed { get; set; }
        public string ContractNo { get; set; }
        public string IPAddress { get; set; }
        public int ThroughDoor { get; set; }
        public int startfloor { get; set; }
        public string Manufacturer { get; set; }//厂商
        public string Model { get; set; }//型号
        public string physicalNumber { get; set; }//物理编号
        public string certificateNumber { get; set; }//合格证编号
        public string regNumber { get; set; }//注册编号
        public int mainAreaId { get; set; }//父区域id
        public string Temperature { get; set; }//温度
        public string mainAreaName { get; set; }
        public string cameraNo { get; set; }
        public int runssum { get; set; }//累计运行次数
        public double ZLX { get; set; }//x坐标
        public double ZLY { get; set; }//y坐标
        public int EmergencyStop { get; set; }//急停
        public int CoverPlate { get; set; }//防盗盖板故障
    }



    public class ElevatorFault
    {
        public string elevatorName { get; set; }//设备名称
        public string areaName { get; set; }//设备位置
        public string elevatorNO { get; set; }//设备编码
        public string Fault_Cause { get; set; }//故障原因
        public string FaultTime { get; set; }//故障时间
        public string mainAreaName { get; set; }//父区域名称
        public string cameraNo { get; set; }//摄像头编号
    }

    public class EscalatorSignal
    {
        public string opcNo { get; set; } = string.Empty;
        public string UpdateTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        public int Direction { get; set; }//运行状态 0=无效 1=上行 2=下行 3=停止
        public int Fault { get; set; }//故障报警 0=无效 1=有效
        public int OverHaul { get; set; }//检修 0=无效 1=有效
        public int EmergencyStop { get; set; }//急停 0=无效 1=有效
        public int CoverPlate { get; set; }//盖板防盗装置报警 0=无效 1=有效
        public int HeartBeat { get; set; }//通讯心跳 0=离线 1=在线
    }
}
